<template>
	<view>
		<detailPage
			:pageUrl="pageUrl"
			:editFormOptions="editFormOptions"
			:editFormFields="editFormFields"
			:detailColumns="detailColumns"
			@masterDate="masterDate"
			:titel="titel"
		></detailPage>
	</view>
</template>
<script>
export default {
	data() {
		return {
			titel: '',
			pageUrl: 'q_operations',
			editFormFields: {
				Remark: '',
				Longitude: '',
				Latitude: '',
				Voucher_sub: '',
				Site: '',
				Operations_date: ''
			},
			editFormOptions: [
				{
					title: 'ID',
					required: true,
					field: 'Operations',
					hidden: true,
					readonly: true
				},
				{
					title: '单据编码',
					field: 'Voucher_sub',
					readonly: true
				},
				{
					title: '站点名称',
					field: 'Site',
					readonly: true,
					data: [],
					key: '运维站点'
				},
				{
					title: '站点名称',
					field: 'Site',
					readonly: true
				},
				{
					title: '运维日期',
					field: 'Operations_date',
					type: 'date',
					readonly: true
				}
			],
			detailColumns: [
				{
					field: 'OperationsList',
					title: 'ID',
					hidden: true
				},
				{
					field: 'Code',
					title: '运维内容编码',
					type: 'string'
				},
				{
					field: 'Name',
					title: '运维名称',
					require: true
				},

				{
					field: 'Operations_date',
					title: '应运维日期',
					require: true,
					type: 'dateTime'
				},
				{
					field: 'Case',
					title: '维护情况',
					require: true
				},
				{
					field: 'Attachment',
					title: '附件',
					readonly: true
				},
				{
					field: 'Image',
					title: '图片',
					type: 'img',
					readonly: true
				},
				{
					field: 'Remark',
					title: '备注',
					readonly: true
				}
			]
		};
	},
	methods: {
		masterDate(val) {
			Object.assign(this.editFormFields, val);
		}
	}
};
</script>
